package com.wtwd.device.constant;


/**
 * 运动类型枚举
 */
public enum SportTypeEnum {

    FREE_TRAINING("1", "自由训练"),
    RUN("2", "跑步"),
    JUMP_ROPE("3", "跳绳"),
    SIT_UPS("4", "仰卧起坐"),
    BRISK_WALKING("5", "健走"),
    RIDING("6", "骑行");

    private String type;


    private String msg;


    SportTypeEnum(String type, String msg) {
        this.type = type;
        this.msg = msg;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    public static SportTypeEnum getSportTypeEnum(String type) {
        for (SportTypeEnum value : SportTypeEnum.values()) {
            if (type.equals(value.type)) {
                return value;
            }
        }
        return null;
    }
}
